<?php
namespace app\helpers;

use think\facade\Filesystem;

class UploadService{
    public function image($file,$dirName='topic'){
        $path = '/storage/'.Filesystem::disk('public')->putFile($dirName,$file);
        return $path;
    }
}